{% extends "sc-base.html" %}



{% block body %}

<h5>creator: {{ acton.creator.user.nickname }}</h5>
<h5>{{ acton.title }}</h5>
<h5>{{ acton.creationTime }}</h5>
<ul>
<h5>{{ CSV|unordered_list }}</h5>
</ul>
<h5> {{acton.description}}</h5>
<h5> {{acton.priority.name}}</h5>
<h5> {{acton.eta}}</h5>
<h5> {{acton.timeNeeded}}</h5>
<h5> {{acton.status.name}}</h5>

<!--<a href="{{foo}}" > {{ message }}</a> {{user_.nickname }}<br />-->
{%if not subscribed and user_%}
Interested?? Please do subscribe... 
		<form action="{% url sanjhachoolha.views.subscribe acton_id=acton.key.id %}" method="post">
		<input type="hidden" name="pdata" value="{{scuser}}">
		<input type="submit" value="Count me in">
		</form>
{% endif %}

{% if subscribed and user_%}
You are currently subscribed to this acton...
		<form action="{% url sanjhachoolha.views.unsubscribe acton_id=acton.key.id %}" method="post">
		<input type="hidden" name="pdata" value="{{scuser}}">
		<input type="submit" value="Unsubscribe">
		</form>

{% endif %}
<!--
{% if user_%}#bug
Add a reminder to this acton
		<form action="{% url sanjhachoolha.views.addreminder acton_id=acton.key.id %}" method="post">
		<input type="hidden" name="pdata" value="{{scuser}}">
		<input type="submit" value="Remind Me">
		</form>

{% endif %}
-->
<hr /><hr />

{%if not acting and user_%}
Hey can I help?... sure 
		<form action="{% url sanjhachoolha.views.signup acton_id=acton.key.id %}" method="post">
		<input type="hidden" name="pdata" value="{{scuser}}">
		<input type="submit" value="I want to help">
		</form>

{%endif%}
{% if acting and user_%}
You are signed up as an actor...
		<form action="{% url sanjhachoolha.views.leave acton_id=acton.key.id %}" method="post">
		<input type="hidden" name="pdata" value="{{scuser}}">
		<input type="submit" value="Leave">
		</form>


{% endif %}


<h3>Comments: </h3>
{% for container in posts %}
<h5>{{forloop.counter}}. posted on: {{ container.post.timestamp }}</h5><br />
{{ container.post.content|safe }}<br />
<br/>
by: {{container.post.poster.user.nickname}}

{% if container.deletable and user_%}
<br />
		<form action="{%url sanjhachoolha.views.delete_comment acton_id=acton.key.id, comment_id=container.post.key.id %}" method="post">
		<input type="hidden" name="pdata" value="{{ user_.email }}">
		<input type="submit" value="Delete">
		</form>

	
{% endif%}
<hr />

{%endfor%}

<form action="{% url sanjhachoolha.views.add_comment acton.key.id %}" method="post">
	<h3> Add comment</h3>
	{{ pform }}
	<input type="submit" value="Post it!" />
	<input type="reset" value="Reset" />
</form>

{%endblock%}